<div class=" navbar navbar-default navbar-fixed-top" id="publicHeaderApp" th:fragment="publicHeader">
    <div class="container-fluid" >

        <div class="row">
            <div class="col-md-12 text-center" style="background-color: cornflowerblue; color: white">
                <a th:href="@{/}" style="color: white"><h3>购物系统</h3></a>
            </div>
        </div>

        <div class="row" style="margin-top: 10px">

            <div class="col-md-5">

            </div>

            <div class="col-md-4">
                <form action="" method="post" class="form-inline">
                    <div class="form-group">
                        <input v-if="!keyword" v-model="keyword" type="text" name="searchName" class="form-control"
                               placeholder="请输入搜索关键词">
                        <input v-if="keyword" v-model="keyword" type="text" name="searchName" class="form-control"
                               :placeholder="keyword">
                    </div>
                    <button type="submit" class="btn btn-default" @click.prevent="toSearch">搜索</button>
                </form>
            </div>

            <div class="col-md-3">
                <a v-if="!currentAccount" class="btn btn-default btn-sm" href="/login.html">登录</a>
                <a v-if="!currentAccount" class="btn btn-default btn-sm" href="/register.html">注册</a>
                <span v-if="currentAccount">欢迎您:{{currentAccount}}</span>
                <a v-if="currentAccount" class="btn btn-default btn-sm" href="/mycart.html">我的购物车</a>
                <a v-if="currentAccount" class="btn btn-default btn-sm" href="/myOrder.html">我的订单</a>
                <a v-if="currentAccount" class="btn btn-default btn-sm" href="/user/logout">退出</a>
            </div>

        </div>

    </div>

</div>